In the process of transferring a media service such as a Digital Television (DTV) or an Internet Protocol (IP) Television (IPTV) service through a multicast technology, the video data rate is reduced by a video encoding compression technology such as Moving Picture Experts Group (MPEG-2), MPEG-4, H.264, Video Codec 1 (VC-1), digital Audio Coding Standard (AVS), or Scalable Video Coding (SVC), which ensures the transmission and playing of media when the transmission bandwidth is limited. As the video encoding compression technologies adopt intra-frame and inter-frame compression schemes, when an end user does not receive any random access point (for example, only receives an inter-frame compressed video frame such as a B or P frame, but does not receive any intra-frame compressed video frame (for example, an Instantaneous Decoding Refresh (IDR) or I frame), the end user cannot perform decoding to play the video. Generally, the end user starts decoding and playing only when receiving a random access point (for example, an inter-frame compressed frame), which, however, causes a delay in the playing of media images. For example, when the user switches from one channel to another channel, the new channel cannot be played immediately. To solve the problem, when the user requests for a new multicast group (switching from one multicast group to another multicast group, or joining a multicast group for the first time), that is, requests for a new media channel (switching from one media channel to another media channel, or acquiring a media channel for the first time), a network equipment does not directly forward the media stream currently being forwarded through multicast to the user, but forwards the media stream starting from a previous random access point (if the current multicast point is close to a next random access point, the media stream may be forwarded immediately), so that media decoding and display may be rapidly performed on the media stream received by the user, thereby reducing the delay caused by waiting for the media for the user. This technology is referred to as a rapid channel switching technology, and may also be referred to as a Rapid Acquisition of Multicast Session (RAMS) technology.
To improve the user experience of rapid video viewing, the RAMS technology or the rapid channel switching technology may be adopted to solve the problem. When the user performs channel switching, the media receiving unit (such as a Set Top Box, STB) requests a network for media streams of a new channel, a network equipment first forwards, according to the current media stream condition, a media stream starting from a previous random access point to the media receiving unit, and the media receiving unit may directly perform decoding and media display after receiving the media stream without waiting for a next random access point; that is to say, for a media stream, a technical solution in the prior art is as shown by a sending sequence of a video service stream in FIG. 1, where when a new video stream is requested between two random access points, for example, between IDR1 and IDR2 in FIG. 1, the video stream will be sent starting from IDR1. If the video stream starts from one random access point and ends at a next random access point but does not include a code stream segment of the next random access point so as to form a Group of Picture (GOP), when rapid channel switching is requested within one GOP, the media stream of the new channel is sent starting from an intra-frame encoded frame of the GOP such as IDR1.
In the process of researching and practicing the prior art, the inventors find that the prior art has the following problems.
When the user requests for a new media stream, to improve the user experience of video viewing, the video data stream is sent starting from a starting intra-frame encoded frame of the GOP such as IDR1, that is, within one GOP, regardless of when the user requests for a new media stream, the network sends media data starting from the starting intra-frame encoded frame of the GOP. In this way, as different users request for new media streams at different time points, the users experience different viewing delays, that is, video frame delays, when viewing the same media service. That is to way, different images are displayed when the users are viewing the same media service at the same time.
Therefore, when an image of a B2 frame is being displayed for one user, another user may be viewing an image of a B15 frame. The longest video display delay among different users may be up to the length of one GOP, that is, one user is viewing an image of IDR1, while the other user may be viewing an image of an IDR2 frame. In this way, if two users viewing the same channel discuss the program with each other by phone, one user may talk about the content that the other user has not viewed, resulting in poor user experience of video watching.